package com.hjh.demo.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import com.hjh.demo.bean.City;
import com.hjh.demo.mapper.CityMapper;

@Component
@Order(value = 1)
public class Comm2 implements CommandLineRunner {
	private static final Logger logger = LoggerFactory.getLogger(Comm2.class);

	@Autowired
	private CityMapper cityMapper;

	@Override
	public void run(String... args) throws Exception {
		logger.error("CommandLineRunner  run ........");

		System.out.println("===========>>222 |" + (cityMapper != null));
		City city = cityMapper.findCityById("1");
		logger.error("City:" + city);
	}

}
